// pages/components/ArticleList/ArticleList.js

Component({
  /**
   * 组件的属性列表
   */
  properties: {
    item:{
      type: Object,
      value: {}
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    imgUrls: [
        //'http://qn.shebeib.com/xinchunkuaile.png',
        'http://qn.shebeib.com/yqyl_banner.png',
        'http://qn.shebeib.com/changshangruzhu.png',
        'http://qn.shebeib.com/yanxuanjilunbotu.png'

      ],
      indicatorDots: false,
      autoplay: true,
      interval: 5000,
      duration: 1000
  },

  /**
   * 组件的方法列表
   */
  methods: {
    detailClick (e) {
    //   wx.navigateTo({
    //     url: '/pages/article/articleDetail/articleDetail?detail_id=' + this.data.item.id,
    //   })
    },
    turnPage:function (e) {
      var userInfo= wx.getStorageSync('userInfo');
       if (!userInfo.nickName) {
         this.setData({
          showLogin:true
         })
         this.triggerEvent('loginerr')
        console.log(123)
         return
       }
     
      // return
       if (e.currentTarget.dataset.code==0) {
          wx.navigateTo({
          url: '/pages/invitation/invitation'
        })
      }
      else if (e.currentTarget.dataset.code==1) {
         wx.navigateTo({
          url: '/pages/cshhr-n/cshhr',
        })
      }else if (e.currentTarget.dataset.code==2) {
          wx.navigateTo({
          url: '/pages/cshhr/cshhr',
        })
      }
    }
  }
})
